package com.dc.designPattern._22_responsibilitychain.impl;

/**
 * Description: 责任链模式_具体处理者_学院审批
 * @author: gdc
 * @date: 2021/6/10
 * @version 1.0
 */
public class CollegeApprover extends Approver {

    public CollegeApprover(String name, Integer maxDay) {
        super(name, maxDay);
    }

    @Override
    protected void handleRequest(LeaveRequest request) {
        System.out.println("请求编号ID=【"+ request.getId() + "】，请假【" + request.getDay() + "】天，【" + getName() + "】院长审批通过");
        if (request.getDay() > getMaxDay()) {
            getApprover().handleRequest(request);
        }
    }

}
